/*
 * Copyright (C) 2020 The LINN Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.juqimiao.linn.transfer.query.builders;

/**
 * 构建响应对象{@link com.juqimiao.linn.transfer.Response}的构造者类。
 *
 * @param <T> 一个指定的任意数据类型。
 *
 * @author  Collin Cai
 */
public class BaseResponseBuilder<T> {

    private T response;

    protected T getResponse() {
        return response;
    }

    protected void setResponse(T response) {
        this.response = response;
    }

    /**
     * 在响应构建过程最后阶段调用，从而得到一个响应对象。
     *
     * @return 一个响应对象。
     */
    public T build() {
        return this.getResponse();
    }
}
